import server from '../index.js';

function post(path, auth = true, config = true) {
  return server.api().post(path).auth(auth).config(config)
}

function get(path, auth = true, config = true) {
  return server.api().get(path).auth(auth).config(config)
}

export default {
  // 甲方业绩确认证明
  ownerProve: {
    list: post('/dt-risk/rkPartyProve/findPage'),
    info: get('/dt-risk/rkPartyProve/[id]'),
    add: post('/dt-risk/rkPartyProve/save'),
    update: post('/dt-risk/rkPartyProve/update'),
    delete: post('/dt-risk/rkPartyProve/delete?idList=[idList]'),
  },
  // 渠道合规审核
  riskAudit: {
    list: post('/dt-risk/orderReview/getPages'),
    tapes: post('/dt-risk/orderReview/getTape'),
    uploadTape: post('/dt-risk/orderReview/uploadTape'),
    audit: post('/dt-risk/orderReview/orderReview'),
    reSubmit: post('/dt-risk/orderReview/orderReviewAgain'),
    channelImages: get('/dt-risk/orderReview/getChannelImage/[orderReviewId]'),
  },
  // 渠道结算
  channelCount: {
    list: post('/dt-risk/rkChannelCalculate/findPage'),
    info: get('/dt-risk/rkChannelCalculate/[id]'),
    update: post('/dt-risk/rkChannelCalculate/updateChannelCalculate'),
    record: post('/dt-risk/rkChannelCalculate/findCalculateLog'),
  },
}